package com.china08.yxyapi.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitConfig {

    // exchange
    public final static String YXDPCEXCHANGE_STRING = "yx.dpc.exchange";

    // 备授课系统,备课包浏览数统计
    public final static String YW_LECTURE_PREPACK_PV = "yxy.yw.lecture.prepack.pv";
    // 电子书包发送到作业系统的学生提交作业
    public final static String STU_EBAG_STUDENT_POST_HOMEWORK = "stu_ebag_student_post_homework";
    // 电子书包发送到作业系统的学生提交作业 新版
    public final static String STU_EBAG_STUDENT_POST_HOMEWORK_V01 = "stu_ebag_student_post_homework_v01";

    // 备授课系统,备课包使用次数
    public final static String YW_LECTURE_PREPACK_USED_COUNT = "yxy.yw.lecture.prepack.used.count";

    // 考勤统计功能
    public final static String YW_TEA_ATTENDANCE_STATISTICS = "yxy.yw.tea.attendance.statistics";

    public final static String YW_STATISTICS_RESOURCE_AREA = "yxy.yw.statistics_resource_area";

    public final static String YW_STATISTICS_RESOURCE_SCHOOL = "yxy.yw.statistics.resource.school";

    public final static String YW_STATISTICS_RESOURCE_SCHOOL_ES = "yxy.yw.statistics.resource.school.es";

    public final static String YW_STATISTICS_RESOURCE_SCHOOL_USER_ES = "yxy.yw.statistics.resource.user.school.es";

    public final static String YW_STATISTICS_RESOURCE_SCHOOL_USER_DAY_ES = "yxy.yw.statistics.resource.school.user.day.es";

    public final static String YW_STATISTICS_RESOURCE_SCHOOL_TOTAL = "yxy.yw.statistics.resource.school.total";

    public final static String YW_STU_ATTENDANCE_STATISTICS = "yxy.yw.stu.attendance.statistics";

    public static final String YW_STATISTICS_RESOURCE_SCHOOL_DAY = "yxy.yw.statistics.resource.school.day";

    public static final String YW_STATISTICS_RESOURCE_SCHOOL_DAY_ES = "yxy.yw.statistics.resource.school.day.es";

    public static final String YW_USER_RESOURCE_STATISTICS_MONTH = "yxy.yw.statistics.resource.user.month";
    // 订单
    public static final String YW_INCOME_DETAILONLINE_SAVE = "yxy.yw.income.detailonline.save";
    // ##
    // 队列:穿透消息
    public final static String JPUSH_FOR_MESSAGE = "yxy.jpush.for.message";

    // ##
    // 队列:通知消息
    public final static String JPUSH_FOR_NOTIFICATION = "yxy.jpush.for.notification";

    // 考试分析
    public final static String ClASS_EXAM_REPORT = "yxy.class.exam.report";

    // 考试小题分析
    public final static String ClASS_EXAMQUES_REPORT = "yxy.class.examques.report";

    // 慧学——成绩提升
    public final static String YW_HUIXUE_PLAN_CHECK_DAY = "yxy.yw.huixue.plan.check.day";

    // 慧学——成绩提升
    public final static String YW_HUIXUE_PLAN_CALCULATE_PROGRESS = "yxy.yw.huixue.plan.calculate.progress";

    // 用户统计 获取角色信息
    public static final String ES_USER_ROLEINFO_SAVE = "es.user.roleinfo.save";

    // 继续教育 ——报名
    public static final String YW_CONTINUEDU_ENROL_ONE = "yxy.yw.continuedu.enrol.one";

    // 继续教育 ——完成任务
    public static final String YW_CONTINUEDU_FINISH_TASK = "yxy.yw.continuedu.finish.task";

    // 继续教育 ——用户任务状态修改
    public static final String YW_CONTINUEDU_USER_TASK_TWO = "yxy.yw.continuedu.user.task.two";

    // 按照学校统计总共资源es 20171218修改
    public static final String YW_STATISTICS_RESOURCE_SCHOOL_NEW_ES = "yw.statistics.resource.school.new.es";

    // 按照学校统计每日资源es 20171218修改
    public static final String YW_STATISTICS_RESOURCE_SCHOOL_USER_DAY_NEW_ES = "yw.statistics.resource.school.user.day.new.es";

    // 按照学校统计地区每天总共资源es 20171220修改
    public static final String YW_STATISTICS_RESOURCE_SCHOOL_DAY_NEW_ES = "yw.statistics.resource.school.day.new.es";

    // 学校网站总访问量 日访问量修改
    public static final String YW_SCHOOL_WEBSITE_PV = "yw.school.website.pv";

    @Bean
    Queue schoolWebsitPv() {
        return new Queue(YW_SCHOOL_WEBSITE_PV, true);
    }

    @Bean
    Queue continueduUserTask() {
        return new Queue(YW_CONTINUEDU_USER_TASK_TWO, true);
    }

    @Bean
    Queue ywStatisticsResourceUserSchoolDayNewEs() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_USER_DAY_NEW_ES, true);
    }

    @Bean
    Queue ywStatisticsResourceSchoolDayNewEs() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_DAY_NEW_ES, true);
    }

    @Bean
    Queue statisticsResourceSchoolNewEs() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_NEW_ES, true);
    }

    @Bean
    Queue continueduStatisticsFinish() {
        return new Queue(YW_CONTINUEDU_FINISH_TASK, true);
    }

    @Bean
    Queue continueduStatisticsEnrol() {
        return new Queue(YW_CONTINUEDU_ENROL_ONE, true);
    }

    @Bean
    Queue userResStatisticsMonth() {
        return new Queue(YW_USER_RESOURCE_STATISTICS_MONTH, true);
    }

    @Bean
    TopicExchange exchange() {
        return new TopicExchange(YXDPCEXCHANGE_STRING);
    }

    @Bean
    Queue homeWorkStatistic() {
        return new Queue(YW_LECTURE_PREPACK_PV, true);
    }

    @Bean
    Queue esbagToHomeWorkForPost() {
        return new Queue(STU_EBAG_STUDENT_POST_HOMEWORK, true);
    }

    @Bean
    Queue esbagToHomeWorkForPostV01() {
        return new Queue(STU_EBAG_STUDENT_POST_HOMEWORK_V01, true);
    }

    @Bean
    Queue yxEdbStatisticSchoolPlatformPvQueue() {
        return new Queue(YW_LECTURE_PREPACK_USED_COUNT, true);
    }

    @Bean
    Queue yxTeaAttendanceStatisticsQueue() {
        return new Queue(YW_TEA_ATTENDANCE_STATISTICS, true);
    }

    @Bean
    Queue ywStatisticsResourceArea() {
        return new Queue(YW_STATISTICS_RESOURCE_AREA, true);
    }

    /**
     * @return 学校资源 总数统计
     */
    @Bean
    Queue ywStatisticsResourceSchool() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL, true);
    }

    /**
     * @return 学校资源 总数统计
     */
    @Bean
    Queue ywStatisticsResourceSchoolTotal() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_TOTAL, true);
    }

    /**
     * @return 学校资源 每日统计
     */
    @Bean
    Queue ywStatisticsResourceSchoolForDay() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_DAY, true);
    }

    @Bean
    Queue yxStuAttendanceStatisticsQueue() {
        return new Queue(YW_STU_ATTENDANCE_STATISTICS, true);
    }

    @Bean
    Queue jpushForMessage() {
        return new Queue(JPUSH_FOR_MESSAGE, true);
    }

    @Bean
    Queue jpushForNotification() {
        return new Queue(JPUSH_FOR_NOTIFICATION, true);
    }

    @Bean
    Queue classExamReport() {
        return new Queue(ClASS_EXAM_REPORT, true);
    }

    @Bean
    Queue classExamQuesReport() {
        return new Queue(ClASS_EXAMQUES_REPORT, true);
    }

    @Bean
    Queue detailOnlineSave() {
        return new Queue(YW_INCOME_DETAILONLINE_SAVE, true);
    }

    @Bean
    Queue huixuePlanCheck() {
        return new Queue(YW_HUIXUE_PLAN_CHECK_DAY, true);
    }

    @Bean
    Queue huixuePlanCalculateProgress() {
        return new Queue(YW_HUIXUE_PLAN_CALCULATE_PROGRESS, true);
    }

    // -----------------------新添------------------------------//
    /**
     * @return 用户资源总数统计es
     */
    @Bean
    Queue ywStatisticsResourceUserSchoolTwo() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_USER_ES, true);
    }

    /**
     * @return 学校资源总数统计es
     */
    @Bean
    Queue ywStatisticsResourceSchoolTwo() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_ES, true);
    }

    /**
     * @return 用户资源统计每天的数据es
     */
    @Bean
    Queue ywStatisticsResourceSchoolUserDayTwo() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_USER_DAY_ES, true);
    }

    /**
     * @return 学校资源每日统计es
     */
    @Bean
    Queue ywStatisticsResourceSchoolForDayTwo() {
        return new Queue(YW_STATISTICS_RESOURCE_SCHOOL_DAY_ES, true);
    }

    @Bean
    Queue userRoleInfoSave() {
        return new Queue(ES_USER_ROLEINFO_SAVE, true);
    }
}
